1. Field of the Invention
The present invention relates to a method and apparatus for searching for a fixed codebook used in a code excited linear prediction (CELP) speech codec.
2. Description of the Related Art
There are various ways of converting speech into a digital signal that can be easily transmitted. The conversion of speech into a digital signal and compression of the digital signal are performed by a vocoder, that is, a speech encoder. Vocoders are categorized into three types: a waveform codec, a source codec, and a hybrid codec. A code excited linear prediction (CELP) speech codec is a kind of a hybrid codec that uses a compression algorithm used during speech encoding at a low bit speed. The CELP speech codec is capable of generating a high-quality speech signal at a bit rate of transmission lower than 16 kbps.
To compress a speech signal, the CELP speech codec makes a codebook using different white Gaussian noises and transmits an index, instead of the speech signal, which corresponds to an optimum white Gaussian noise stream. In the optimum white Gaussian noise stream, an error between an input speech signal and synthesis voice is minimized. The channel capacity of a gateway for use in a Voice over Internet Protocol (VoIP) depends largely on the complexity of a speech codec. In turn, the complexity of the speech codec, which uses the CELP technique, is determined by the type of a fixed codebook search method.
FIG. 1 is a table illustrating the structure of a G.729 speech codec. As shown in FIG. 1, pulses i0, i1, i2, and i3 are generated on tracks #0, #1, #2, and #3, respectively, each pulse having amplitude +1 or −1. Pulse position indexes of track #0 are 0, 5, 10, . . . , and 35; pulse position indexes of track #1 are 1, 6, 11, . . . , 36; pulse position indexes of track #2 are 2, 7, 12, . . . , 37; and pulse position indexes of track #3 are 3, 8, 13, . . . , 39. Searching for a fixed codebook is to detect an optimum pulse position of each of tracks #0 through #3.
A full search method, which is included in the fixed codebook search method, detects a fixed codebook at every possible pulse positions. Thus, good-quality speech can be obtained but the amount of calculation is large. For this reason, much time is spent on searching for the fixed codebook and the channel capacity of a gateway becomes insufficient.
A focused search method, which is also included in the fixed codebook search method, predetermines a threshold related to pulse positions on a higher-rank track, compares all combinations for detecting the pulse positions with the threshold, and excludes the least possible the combinations. Compared to the full search method, the focused search method is less complex and requires a relatively low-amount of calculation. Thus, the quality of sound is lower than that obtained using the full search method.
A depth-first tree search method, which is also included in the fixed codebook search method, sequentially and continuously detects pulse positions for every two tracks. In this method, several candidate pulse positions are selected on one of two tracks using a correlation value between the two tracks, and the detection is performed on the other track, thereby largely reducing the amount of computation and maintaining search complexity. As compared to the full search method and the focused search method, the amount of computation can be greatly reduced but the quality of sound is lower than the quality of sound obtained using the depth-first tree search method.
The above search methods, which are different types of the fixed codebook search method, are applicable only to particular-type speech codecs. Accordingly, it is difficult to adjust the quality of sound and the amount of computation in consideration of the number of users who access a gateway.